Living near and using the line, may I point out that from observation, the majority of local passengers on this stretch of line are not travelling between Soton and Pompey, but are travelling between those cities and the local stations.
Westbound from Fareham onwards, there are 4 tph to Soton.
1x non-stop from Fareham to Soton (the FGW Portsmouth - Cardiff), carrying a high proportion of passengers travelling onwards to Bristol and S. Wales, in addition to local traffic between Pompey, Fareham and Soton.
1x local all stopper (SWT); gradually emptying Pompey originating passengers as it goes along and picking up Soton bound passengers in increasing numbers from Fareham onwards.
2x West Coastway services (Southern) that run alternately between Soton and either Brighton or London Victoria (via Gatwick).
These 2 services bypass Pompey (connections available at Havant, Cosham and Fareham, depending on direction of travel), but carry a large number of local passengers travelling between Fareham, Swanwick and Soton. It is considered to be the main local service for those stations.
Light rail/ tram wouldn't be of any benefit as a replacement of these mainline services, however there is another potential role for such provision.
There are now large areas of settlement with a fairly large population, spread along this part of the south coast, stretching from Totton (west of Soton) to Havant (east of Pompey).
The Fareham - Gosport - Portsmouth tram scheme was turned down, but a Gosport - Fareham - Portchester - Cosham - Pompey route, mostly following the road structure and operating closer to the residential areas, with plenty of stops, would serve a market that is largely not provided for by the heavy rail service. Currently this market is served by various bus services, but dominated by private car use.
Unfortunately, a large section of the disused Fareham - Gosport railway line, slated for use in local light rail, has now been converted into an unguided busway.
West of Fareham, particularly west of the River Hamble, there is no need for a light rail/ tram system to be connected to the Fareham - Gosport - Pompey area, as everything is oriented towards the Southampton area.