The alkyl chain in these alcohols is hydrophobic. Greater the surface area of this hydrophobic part, less is the solubility.
In case of tert-butyl alcohol the alkyl group is branched and has less surface area i.e. less hydrophobic and hence more soluble in water. Indeed, it is almost miscible with water.
Whereas, the alkyl chain in n-butyl alcohol is linear and has more surface area i.e., more hydrophobic and less soluble.