Short answer: one can find the natural width of the box, the exact amount of stretch if it is finite (otherwise one can only say "it's infinite"), and similarly the exact amount of shrink if it is finite.
Let us assume for definiteness that \mybox is a horizontal box such as
\newbox\mybox
\setbox\mybox\hbox spread 5pt{Some text perhaps.}
To find its natural width, do \setbox0\hbox{\unhcopy\mybox}: then the
answer is the width \wd0 of box 0.
We can only probe the amount of glue stretch or shrink by setting the
box with a width different from its natural width, and testing the
\badness. Setting the box to a width larger than its natural width
probes the stretch component, and setting it to a width smaller than its
natural width probes the shrink component. In both cases, if the
corresponding component (stretch for larger widths, shrink for smaller
widths) is infinite then the \badness will be zero, telling us nothing
about the value or sign of that infinite component. I see no other way
to probe such infinite values, so let's focus on the finite case.
The general formula for the badness is quite complicated: it involves in
some cases the combination 100(t/s)^3 where t is the difference
between the natural width of the box and the width that was asked for,
and s is the amount of stretch (or shrink, if the box was squeezed).
Fortunately, we can go by with only a very simple case. Our basic
construction for testing the amount of stretch is \setbox0\hbox spread
1sp{\unhcopy\mybox\hskip 0pt plus -\stest} where \stest is a
dimension that we will vary. The amount of stretch in this box is the
amount in \mybox, minus \stest. If that is positive, then the box
can stretch, and the \badness is not too big (as it turns out, 100 or
less). Otherwise, the box is underfull, as it cannot stretch even by
1sp, and the \badness is 10000 (when testing the shrink, we get
overfull boxes with a \badness of 1000000). We thus have a simple way
to test whether the amount of stretch in \mybox is >\stest or
<=\stest for any dimension \stest. The task is thus reduced to a
dichotomy.
\hbadness=1000000
\hfuzz=\maxdimen
\newdimen\stest
\newdimen\smin
\newdimen\smax
\def\find#1#2#3{%
\smin = -\maxdimen
\smax = \maxdimen
\loop
\stest = \smin
\advance \stest by \smax
\divide \stest by 2 % now \stest=(\smin+\smax)/2 truncated to 0
\ifdim \stest = \smax
\advance \stest by -1sp % ensure that \smin<=\stest<\smax.
\fi
\setbox 0 = \hbox spread #2 1sp {%
\unhcopy\mybox
\hskip 0pt #3-\stest
}%
\ifnum \badness > 100 % (shrink/stretch in \mybox) <= \stest
\smax = \stest
\else
\smin = \stest
\advance \smin by 1sp
% since ">\stest" implies ">=\stest+1sp"
\fi
% In both cases, the interval [\smin,\smax] becomes smaller.
\ifdim\smin<\smax
\repeat
\ifdim\smin>\smax\BOOM\fi% cannot happen, I think
\message{^^JThe #1 is
\ifdim\smin=\maxdimen infinite\else\the\smin\fi.}% (\smin=\smax)
}
\setbox0\hbox{\unhcopy\mybox}
\message{^^JThe natural width is \the\wd0 .}
\find{stretch}{}{plus}
\find{shrink}{-}{minus}