Ultrasonic sensor work on the principle of reflected sound. Unlike proximity sensors using light or cameras, dark environments have no effect on an ultrasonic sensor’s detection ability as well as not highly affected by dust, dirt, or high-moisture environments that makes it preferable for agriculture.
Remotely sensed data do not depends on day light as a beam of light is directed towards the area of interest and sensors catches the returning beam and the software's are used to draw different indices on the basis of these observations and information based on these indices reading. IR are low energy carrying spectrum of light therefore it can only be penetrate a few Cm below the ground or top soils and its efficiency is nearly about 89% which is satisfactory in terms of Agricultural applications. but if you are dealing with the deep soil profiles for some other purposes for mining or water quality parameters then Ultra sonic may b a good option as infra red do not hold the potential to travel so deep to explore the required information or data. For agricultural applications Infra Red readings are reliable accessible, workable and applicable to ultrasonic.
In my master degree I use low cust sensors. I make a sheet ( cust, distance, death zone, operation frequency, field of view, Power, i2c, protection, type). I include Microwave and LIDAR. Look at the new 3d tof cellphone Cam too.