always in your interests to mix to the best quality audio you can - for soundcloud you can upload your audio in 24bit wave at your preferred sample rate (44.1 or 48 or 88.2 or 96 or 192) and it will transcode your audio to 128mbps mp3 for streaming - in fact soundcloud always transcode your audio to 128 mbps mp3 regardless of what encoding you upload - with mp3s this can add unwanted colour and noise to your mix
as for youtube again use the best possible audio you can in most cases this will be flacc/aac/ogg, but will be dictated by your video editing software as much as anything else