How to do safely a Aikido front roll from standing position and from jumping ? What are the key point to be careful for avoid injury like shoulder dislocation ? What are other injury that can happen when doing it incorrectly ?
The first, and biggest, point is that if it hurts don't do it. Be careful with an injured shoulder, possibly focusing more on the opposite side or starting on your injured side significantly more slowly or at a lower height (get the dive roll perfect from the knees first). The other major thing is to make sure you are practicing on good mats. There's no sense in doing this on hardwood, concrete, or something uneven such as grass: focus your practice on high quality mats that are designed for this sort of thing (most Aikido dojos already have these).
A previous dislocation, assuming that you've healed from it (and are cleared by your doctor, standard caveats apply, etc), shouldn't keep you from doing the technique successfully without substantive risk.
With that in mind, the biggest thing to focus on is perfect form. Your highest risk of injury is going to come from doing the technique incorrectly and landing sharply on the shoulder.
Major components of a dive roll, assuming we are talking about the standard seen in this instructional video, which covers it fairly effectively:
This is all based on Hapkido dive rolls, but should be substantively similar to what you are trying to work with.
Doing it at height (standing, jumping, etc) is substantively similar to doing it from your knees: Largely the same thing, just at different height. So I cannot stress enough the importance of working on your technique lower
If you practice slowly on good mats, taking it easy and working on perfect form, then you'll significantly reduce your chance of injury as you move on to more advanced–and higher up–versions.
That all having been said and with the standard disclaimers in place: listen to your body. If your body says "stop that" then stop doing it. Don't push an injury, its a good way to end up reinjured. Listen to your doctor and your sensei if they have anything to say about the matter as well.
When I was first instructed on rolling (apart from what has already been mentioned), I was told to imagine being wrapped around a beachball. This can help in keeping the back curved which makes for a smooth roll. This is especially for those whose instinct is to flatten out mid roll and knock the hips into the ground towards the end.
Speaking as an aikidoka, Mr. Clements' answer is good. I want to add my emphasis to a few points.
First, look at your belt or your toes. This will prevent the most serious injuries (head and neck injuries). Tucking your head is the most important thing to remember.
Second, breathe. Breathing is the second most important. I'm not aware that you'll do yourself permanent injury from failing to breathe, but you will feel the fall much more. If you're holding your breath, the impact will be transmitted to your entire body in a very unpleasant way. If you breathe out, you'll hurt less.
Third, do not cross your legs. Get into a habit of which leg is forward and which one is back and make sure they don't cross. Very infrequently the top leg will come down on the lower leg with enough force to snap the lower leg. This is more common if you land with one leg "horizontal" on the mat and one leg "vertical" with only the foot touching. If the foot lands on the shin, you're in trouble.
Fourth, watch the seniors do the high falls. Most dojos will practice high falls, and I've learned a lot from watching my sempai. There are a couple who are so smooth that they are almost artistic.
I wanted to provide a few more resources; there is quite a bit out there on aikido ukemi. As one of my fellow students points out, studying ukemi is as important as studying waza; perhaps more so, since waza and ukemi can occur in a chain, but one failed ukemi breaks the chain.)
Some useful links:
You also asked about jumping rolls (by which I assume you mean what I call high falls - frex kote gaeshi). The sources cited have some good advice in graduating to that level. I'll try to find some video of other practice techniques.
For example, kneel on all fours, and reach your left hand under your body to your right side. Have a partner grab your left hand and raise it rapidly; you'll flip over and learn to take the high fall from a very low place.
I strongly prefer that my partner hold on when practicing or performing high falls. If the partner doesn't hold on, I wind up skipping across the mat like a stone on a pond until I hit a wall or another student.
Last minute update - I noticed that you also asked what other kinds of injuries (apart from shoulder dislocation) can happen. Struck me as worth calling out that answer separately. I've mentioned the possibility of a broken leg, and both I and Mr. Clements have alluded to the potential for head/neck injury from failing to tuck the head. The two most common injuries of which I'm aware are not strictly the result of doing the roll incorrectly. The most common injury in my experience is to "miss the mat" and slap (hand or foot) on the flooring under the mat. Slapping wood or concrete will make you realize how much you appreciate the mat. The next most common injury I've seen is when two tori's decide to throw two separate Uke's at the same area of the mat. I've had a 300+ pound man land on my head. Unpleasant but surviveable. Tori has a responsibility to make sure that Uke's landing area is clear.
I know this is not what you want to hear, but you cannot learn ukemi and falling technique from written descriptions. You must learn from a qualified instructor who can coach, observe and give objective feedback.
You are better off if the instructor knows how to teach falling in stages, so your first try is not a full forward roll from standing--this is an invitation to pain, which leads to avoidance, which leads to bad technique which leads to injury or quitting.
If you are female, you can learn principals from male instructors; similarly for men learning from female instructors. However, the detailed optimal (and safe) falling lines for males and females are different. Women who try to imitate men falling tend to pile drive their shoulders and break their collar bones, which is not a positive outcome. Men who try to fall like women pancake on their backs, and that hurts too.
There is only one thing that is true, and easy to write about falling technique in general, but no one does it until they learn it themselves the hard way. Breath out.