Sniper is one of my favourite heroes in Dota 2 for when I want to be able to destroy the opposing team. He is very fragile though and requires farm, but if you ensure you avoid too many ganks and get as much core items as possible, sniper is a force to be reckoned with in late-mid to late game. Please remember though, sniper is a hard carry and requires a good amount of farm to become really effective, and to try avoid getting killed. As a result, he isn't picked very often in competitive play but when he is, he is the main carry usually, and tends to go in the safe lane with a tri or even dual lane.
Sniper works well for mid lane or safe lane. If laning with a good partner I prefer using safe lane for easy farm and with his headshot skill works wonders to get kills in lane. Good heroes tend to be those who have slows or stuns that allow sniper to get free hits to harass heroes, and allowing sniper to get away if things get too hot. Heroes such as Lion, Earthshaker, Sandking and Venomancer work really well.
In mid lane, getting a bottle is situational. Sniper is not that good at ganking till he gets some items although he is useful to finish off heroes who have little hp left. Rune control as a result is not as important, and sniper does not use many mana intensive skills early on. It is far better to get boots of speed, use your range to stay out of enemy harass or to even deny runes and concentrate more on staying in lane for more exp and last hits.
Concentrate on last hits. If against melee hero try and harass as MUCH as possible. They will be forced back and denied last hits, and allows you to gank them easily with help from supports in safe lane. Once you hit level 6, keep harassing until they are low and then surprise them when they think it's ok to stay in sight of you with assassinate.
By now you should have your upgraded boots and should be saving for a shadow blade. You need to continue to get last hits as you're main aim is getting the gold to help get your items. At this point, try to be present at some of the nearby team fights and try to gank your enemy lane heroes if they are still there as you will have your ultimate to help pick off kills. Make sure you have a TP at all times to ensure you can teleport BEHIND your allies at a fight when the enemy pushes at a tower. Remember, you are squishy and you should always have allies between you and the enemy as your range lets you pick off heroes from afar.
In a way, sniper's aim is to steal some kills to help him farm up and your ultimate is a great way to pick off heroes from afar whilst not missing too much time farming. Try not to steal kills from heroes on your team who need farm too. Getting Shadow Blade really helps to farm last hits in 'relative' safety as it provides an escape mechanism. However, be mindful of enemy hero skills and their use of sentry/dust.
This is when sniper becomes really scary. You need to be present at every team fight at this point, but continuing to farm for your final damage items. Your damage output this stage of the game ensures you take down the enemy team extremely fast. You can take some heroes solo, but generally speaking you are too squishy to do so the majority of the time until you have most of your items, and especially if the enemy team has multiple kinds of stun. Try to engage with support from your allies in this scenario and let them initiate. The KEY is to stay back and fire on enemy heroes from a distance.