This first uses sed to convert the format you gave, 10152015, to the format mm/dd/yyyy, which the GNU implementation of the date command, with its -d options understands. This is accomplished by echoing the original date into sed which inserts the slashes /. This re-formatted date value is stored in D. Next we call datedate with instructions to print the output format "mmddyyyy", and tell it to print the date of yesterday using $D as the current date.
#!/bin/sh D=$(echo $"${1-10152015}" | sed 's,^\(..\)\(..\)\(....\)$,\1/\2/\3,') date +%m%d%Y -d"$D yesterday"