really depends on the shoes and distance
tri specfic runners are designed for use without socks - they have a smooth sock like lining - but many other classic runners can be used without (I use Asics DS trainers for short distance tris without socks)
but if it's not tri specific you may find a seam rubbing after a while which will not get easier so even though I've used my shoes without socks in a middle distance race, it got very uncomfy. so for me beyond 10k I will wear socks, 10k and below, won't bother.
likewise on the bike - I don't wear socks in competition with my tri shoes (Northwave) - they are comfy without up to IM distance.