You'll have to be familiar with what type of seaweed is washed up. It is alright to consume the seaweed if you know what it is and if it isn't decomposing. If there are gray or black spots or if it stinks, then decomposing has begun. If decomposing has set in, just use this seaweed for your garden.
Once you've collected the fresh seaweed, wash in clean seawater and remove any sand and other foreign matter. Either keep in a cooler or hang them to dry.