1. Practice, practice, practice. Test the capabilities of your camera -read the manual - how does it behave in various lighting condidtions ? Are your photos sharp and in focus ? If not, use a faster shutter speed, increase the ISO setting if necessary. If your photos are consistently too dark, or too bright, you may need to over-ride automatic exposure settings if your camera allows this.
2. The most important factor is do you like the picture yourself ? Of course it is nice if others like your photos as well. There are commonly accepted "rules" about picture composition - ideally the main focal point of the picture should be one third of the way across the picture, rather than dead centre. However, breaking the rules can sometimes produce a good photo.
3. Visit a variety of locations, stations, open countryside, etc. Also try photos of non-railway subjects - nature, scenery, flowers, portraits, buildings, etc. - whatever interests you.
4. Once you have plenty of experience, resist the temptation to upload every single photo to the internet. A few varied exposurss have more impact to site visitors than lots of similar views.