One way you could achieve this the following:
- Create a point in the middle of the screen, with a random height; you now have two sections, one on each side of this point
- For every section, divide into two placing a point in the middle of this section, with (ranged) random height between its two neighbours
- Repeat n times.
What happens is detail in the scenery gets finer with each iteration.
How you handle boundary cases is up to you: you could assume points at (0,height/2) and (width,height/2) for instance.
Hope this helps!
EDIT: Here is a picture I made for illustration:
